package com.cxyd.common;

import com.cxyd.domain.ResponseBody;

import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;

public class ResponseQueue {
    private static final Queue<ResponseBody> resQueue = new ConcurrentLinkedQueue<>();

    public static void addMsg(ResponseBody msg) {
        resQueue.offer(msg);
    }

    public static ResponseBody getMsg() {
        return resQueue.poll();
    }

    public static int getMsgCount() {
        return resQueue.size();
    }
}
